home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 21 / AACD 21.iso / AACD / Utilities / Ghostscript / src / spsdf.h < prev    next >
Encoding:
C/C++ Source or Header  |  2001-01-01  |  3.2 KB  |  88 lines

  1. /* Copyright (C) 1999 Aladdin Enterprises.  All rights reserved.
  2.   
  3.   This file is part of AFPL Ghostscript.
  4.   
  5.   AFPL Ghostscript is distributed with NO WARRANTY OF ANY KIND.  No author or
  6.   distributor accepts any responsibility for the consequences of using it, or
  7.   for whether it serves any particular purpose or works at all, unless he or
  8.   she says so in writing.  Refer to the Aladdin Free Public License (the
  9.   "License") for full details.
  10.   
  11.   Every copy of AFPL Ghostscript must include a copy of the License, normally
  12.   in a plain ASCII text file named PUBLIC.  The License grants you the right
  13.   to copy, modify and redistribute AFPL Ghostscript, but only under certain
  14.   conditions described in the License.  Among other things, the License
  15.   requires that the copyright notice and this notice be preserved on all
  16.   copies.
  17. */
  18.  
  19. /*$Id: spsdf.h,v 1.2 2000/09/19 19:00:51 lpd Exp $ */
  20. /* Common output syntax and parameters for PostScript and PDF writers */
  21.  
  22. #ifndef spsdf_INCLUDED
  23. #  define spsdf_INCLUDED
  24.  
  25. #include "gsparam.h"
  26.  
  27. /* Define an opaque type for streams. */
  28. #ifndef stream_DEFINED
  29. #  define stream_DEFINED
  30. typedef struct stream_s stream;
  31. #endif
  32.  
  33. /* ---------------- Symbolic data printing ---------------- */
  34.  
  35. /* Print a PostScript string in the most efficient form. */
  36. #define PRINT_BINARY_OK 1
  37. #define PRINT_ASCII85_OK 2
  38. #define PRINT_HEX_NOT_OK 4
  39. void s_write_ps_string(P4(stream * s, const byte * str, uint size,
  40.               int print_ok));
  41.  
  42. /*
  43.  * Create a stream that just keeps track of how much has been written
  44.  * to it.  We use this for measuring data that will be stored rather
  45.  * than written to an actual stream.
  46.  */
  47. int s_alloc_position_stream(P2(stream ** ps, gs_memory_t * mem));
  48.  
  49. /*
  50.  * Create/release a parameter list for printing (non-default) filter
  51.  * parameters.  This should probably migrate to a lower level....
  52.  */
  53. typedef struct param_printer_params_s {
  54.     const char *prefix;        /* before entire object, if any params */
  55.     const char *suffix;        /* after entire object, if any params */
  56.     const char *item_prefix;    /* before each param */
  57.     const char *item_suffix;    /* after each param */
  58.     int print_ok;
  59. } param_printer_params_t;
  60. /*
  61.  * The implementation structure should be opaque, but there are a few
  62.  * clients that need to be able to stack-allocate it.
  63.  */
  64. typedef struct printer_param_list_s {
  65.     gs_param_list_common;
  66.     stream *strm;
  67.     param_printer_params_t params;
  68.     bool any;
  69. } printer_param_list_t;
  70. #define private_st_printer_param_list()    /* in spsdf.c */\
  71.   gs_private_st_ptrs1(st_printer_param_list, printer_param_list_t,\
  72.     "printer_param_list_t", printer_plist_enum_ptrs, printer_plist_reloc_ptrs,\
  73.     strm)
  74.  
  75. #define param_printer_params_default_values 0, 0, 0, "\n", 0
  76. extern const param_printer_params_t param_printer_params_default;
  77. int s_alloc_param_printer(P4(gs_param_list ** pplist,
  78.                  const param_printer_params_t * ppp, stream * s,
  79.                  gs_memory_t * mem));
  80. void s_free_param_printer(P1(gs_param_list * plist));
  81. /* Initialize or release a list without allocating or freeing it. */
  82. int s_init_param_printer(P3(printer_param_list_t *prlist,
  83.                 const param_printer_params_t * ppp, stream * s));
  84. void s_release_param_printer(P1(printer_param_list_t *prlist));
  85.  
  86.  
  87. #endif /* spsdf_INCLUDED */
  88.